<!-- 设置页面 -->
<div class="tab-content" id="setup">
    <header class="page-header">
        <h2>API 配置</h2>
        <p>配置你的 AI 模型服务</p>
    </header>

    <div class="config-container">
        <!-- 模型厂商选择 -->
        <div class="config-section">
            <h3>选择模型厂商</h3>
            <div class="provider-tabs">
                <button class="provider-tab active" data-provider="deepseek">
                    <i class="fas fa-brain"></i>
                    DeepSeek
                </button>
                <button class="provider-tab" data-provider="zhipu">
                    <i class="fas fa-robot"></i>
                    智普
                </button>
                <button class="provider-tab" data-provider="gemini">
                    <i class="fas fa-gem"></i>
                    Gemini
                </button>
            </div>
        </div>

        <!-- 模型选择 -->
        <div class="config-section">
            <h3>选择模型</h3>
            <div class="model-selector">
                <select id="model-select" class="model-dropdown">
                    <option value="">请先选择大模型</option>
                </select>
            </div>
        </div>

        <!-- API Key 配置 -->
        <div class="config-section">
            <h3>API Key 配置</h3>
            <div class="api-key-group">
                <div class="input-wrapper">
                    <input type="text" id="api-key-input" placeholder="请输入你的 API Key" class="api-key-input">
                    <button class="btn-register" id="register-btn">
                        <i class="fas fa-external-link-alt"></i>
                        网站注册
                    </button>
                </div>
                <div class="api-key-hint">
                    <i class="fas fa-shield-alt"></i>
                    你的 API Key 将安全地保存在本地，不会上传到任何服务器
                </div>
            </div>
        </div>

        <!-- 连接性测试 -->
        <div class="config-section">
            <h3>连接性测试</h3>
            <div class="connection-test-group">
                <button class="btn-test-connection" id="test-connection-btn">
                    <i class="fas fa-wifi"></i>
                    测试连接
                </button>
                <div class="connection-status" id="connection-status">
                    <div class="status-indicator" id="status-indicator">
                        <i class="fas fa-circle"></i>
                    </div>
                    <span class="status-text" id="status-text">未测试</span>
                </div>
            </div>
        </div>

        <!-- 应用信息和升级 -->
        <div class="config-section">
            <h3>应用信息</h3>
            <div class="app-info-group">
                <!-- <div class="app-info-row">
                    <div class="info-item">
                        <i class="fas fa-tag"></i>
                        <span class="info-label">当前版本:</span>
                        <span class="info-value" id="current-version">v1.0.0</span>
                    </div>
                    <div class="info-item">
                        <i class="fas fa-calendar-alt"></i>
                        <span class="info-label">更新时间:</span>
                        <span class="info-value" id="update-time">检测中...</span>
                    </div>
                </div> -->
                
                <div class="update-section">
                    <button class="btn-check-update" id="check-update-btn">
                        <i class="fas fa-sync-alt"></i>
                        检测升级
                    </button>
                    <div class="update-status" id="update-status">
                        <div class="update-indicator" id="update-indicator">
                            <i class="fas fa-info-circle"></i>
                        </div>
                        <span class="update-text" id="update-text">点击检测最新版本</span>
                    </div>
                </div>

                <!-- 更新详情（默认隐藏） -->
                <div class="update-details" id="update-details" style="display: none;">
                    <div class="update-details-content">
                        <h4>
                            <i class="fas fa-rocket"></i>
                            发现新版本: <span id="latest-version"></span>
                        </h4>
                        <div class="update-changelog" id="update-changelog">
                            加载中...
                        </div>
                        <div class="update-actions">
                            <button class="btn-download-update" id="download-update-btn">
                                <i class="fas fa-download"></i>
                                下载更新
                            </button>
                            <button class="btn-close-update" id="close-update-btn">
                                <i class="fas fa-times"></i>
                                稍后更新
                            </button>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <!-- 保存按钮 -->
        <!-- <div class="config-actions">
            <button class="btn-save-config" id="save-config-btn">
                <i class="fas fa-save"></i>
                保存配置
            </button>
        </div> -->
    </div>
</div>
